package com.macro.mall.dao;

import com.macro.mall.dto.PmsSkuFlashSum;
import com.macro.mall.model.PmsSkuStock;
import com.macro.mall.model.SmsFlashPromotionProductRelation;
import com.macro.mall.model.SmsFlashPromotionSkuRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author：Minxiao-Hao
 * @Description: 商品限时购与商品sku关系Dao
 * @name：SmsFlashPromotionSkuRelationDao
 * @Date：2024/10/31 18:26
 */

public interface SmsFlashPromotionSkuRelationDao {
    //根据ID查询
    SmsFlashPromotionProductRelation selectByPrimaryKey(Long id);
    //删除
    void del(@Param("skuId") Long skuId, @Param("flashPromotionId") Long flashPromotionId, @Param("flashPromotionSessionId") Long flashPromotionSessionId);
    //添加
    void insert(@Param("flashPromotionId") Long flashPromotionId, @Param("flashPromotionSessionId") Long flashPromotionSessionId, @Param("pmSkuStockList") List<PmsSkuStock> pmSkuStockList);
    //查询
    List<PmsSkuFlashSum> findBySkuIdCount(List<PmsSkuStock> skuStockList);
    //列表查询
    List<SmsFlashPromotionSkuRelation> findAll();

}
